﻿'Imports System.Data
'Imports System.Data.SqlClient
'Imports System.Net.Mail
'Imports System.Text
'Imports System.IO
'Imports System.Xml.Serialization
'Imports System.Text.Encoding

'Friend Class LTUtility

'    Shared Function GetList(ByVal CommandObject As Data.SqlClient.SqlCommand, _
'                            ByVal Connection As SqlConnection) As DataTable
'        CommandObject.Connection = Connection
'        Dim dt As New DataTable
'        Dim red As SqlDataReader
'        Try
'            red = CommandObject.ExecuteReader
'            dt.Load(red)
'        Catch ex As Exception
'            Throw ex
'        End Try
'        Return dt
'    End Function

'#Region "Security"
'    Shared Function HashBytes_SHA512(ByVal DataToHash() As Byte) As Byte()
'        Return New Security.Cryptography.SHA512Managed().ComputeHash(DataToHash)
'    End Function
'    Shared Function HashBytes_SHA512(ByVal DataToHash As String) As String
'        Dim bData() As Byte = ASCIIEncoding.ASCII.GetBytes(DataToHash)
'        Dim bHashedData() As Byte = HashBytes_SHA512(bData)
'        Return System.Text.Encoding.Default.GetString(bHashedData)
'    End Function
'    Shared Function EncriptData_3DES(ByVal rawData As String) As String
'        Dim rj As New TrippleDesEncryption
'        Return rj.EncryptData(rawData)
'    End Function
'    Shared Function DecryptData_3DES(ByVal encData As String) As String
'        Dim rj As New TrippleDesEncryption
'        Return rj.DecryptData(encData)
'    End Function
'#End Region

'#Region "Formatting Functions"
'    Shared Function DateFormatDisplay(ByVal sampleDate As DateTime) As String
'        Return Format(sampleDate, "dd-MMM-yy hh:mm:ss")
'    End Function
'    Shared Function DateFormatSql(ByVal sampleDate As DateTime) As String
'        Return Format(sampleDate, "yyyy-MM-dd HH:mm:ss")
'    End Function
'#End Region

'End Class

